Release 10.1A: OpenEdge Development:
Programming Interfaces
Status messages
A status message is a string of text that appears in the status area of a window and describes the function of the field-level object that has input focus.
Notes: The status area is an optional feature of an OpenEdge application window. It displays one line of message text at the bottom of the window. Its appearance is controlled by theSTATUS-AREAattribute. Thus, if theSTATUS-AREAis disabled on a window, no help message appears. While a dialog box does not have a status area, help strings defined for fields on a dialog box are displayed in the status area of its parent window.
Also, when you use theHELPattribute to display help text for a widget, Progress overwrites any status text (defined with theSTATUSstatement) with theHELPtext.Status messages are a good way to provide cursory information about a database field or a field-level object in your application.
OpenEdge provides the ability to associate status messages with database fields and those field-level objects that can receive input focus. These messages are easy to implement and produce a preliminary level of help for your application. When the user tabs through certain field-level objects (fill-in fields, buttons, combo boxes, selection lists, editors, toggle boxes, radio sets, and sliders) that are enabled for input on an application interface, OpenEdge displays help text in the status area of the current window, as shown in Figure 10–1.
Figure 10–1: Status bar message for a field-level object
![]()
There are three methods for creating help text in the status area:
The next three sections discuss these methods for creating help text.
Associating help text with database fields
By default, a data representation object associated with a database field displays the help text defined for that database field. You can define and store a default help string as part of the schema definition of a database field using the Data Dictionary. Creating help strings in the database schema provides a centralized location for help strings and makes them easy to maintain.
![]()
To define help text in a database field’s schema definition:
- Connect to your application database, for example,
sports2000.- In the Data Dictionary, select a database table (for example, Customer) then choose the Fields button
.
- Double-click a database field, for example, Name. The Field Properties dialog box appears:
![]()
- In the Help Text field, type the text string you want to associate with the database field, then choose OK.
You can then run a test program to view the message in the status area. For example, you can open the Procedure Editor and run the following program:
You can then run this program to see your help text shown in the status area of the running window, as shown in Figure 10–2.
Figure 10–2: Sample database field help text in the status area of a window Note: Make sure that the test program involves an update to the database field. A program that just displays the field does not show the help message in the status area.
![]()
Specifying help text with the Progress 4GL
The alternative to associating help strings with database fields is to define help strings as a part of field-level objects that contain the data. To attach a help string to a field-level object, use the
HELPoption of the Format phrase specified with the following 4GL statements:DEFINEBROWSE,DEFINETEMP-TABLE,DEFINEFRAME,ENABLE,FORM,PROMPT-FOR,SET, orUPDATE. The following code shows an example using theDEFINE FRAMEstatement:
You can also use the
HELPattribute to define help strings for field-level objects. For example, after theDEFINEFRAMEstatement, you can use the following code to change the help text for the button:
In Progress, the Format phrase
HELPoption and theHELPattribute let you define help strings for widgets not associated with database fields. Help strings defined with these options override any help strings specified for associated database fields in the Data Dictionary. For more information, see the Format Phrase and theHELPattribute reference entries in OpenEdge Development: Progress 4GL Reference .Defining help text with the AppBuilder
Within the AppBuilder, you can specify a help string for a field-level object in its Advanced Properties dialog box.
![]()
To define help text for a field-level object in the AppBuilder:
Note: Make sure that the status area of your window is enabled. To check this option, select the design window’s title bar then choose the Object Properties button from the AppBuilder toolbar. The property sheet for the window appears. Verify the Status-Area option is checked.- Open your window (
.w) file in the AppBuilder.- Double-click on a field-level object, such as a button. The property sheet for the object appears.
- Choose the Advanced button in the property sheet. The Advanced Properties dialog box appears.
- Type a help message in the Help field. For example, for a Cancel button message you could type: Cancel the operation and exit:
![]()
- Choose OK to close the Advanced Properties dialog box.
- Choose OK again to close the property sheet.
- Save the window. The help string that you typed in the Advanced Properties dialog box becomes part of a
HELPoption of aFORMATphrase in theDEFINEFRAMEstatement generated by the AppBuilder.- Run the window and select the object (in this example, the Cancel button). The help text appears in the status area of the window:
![]()
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |